package com.yss.sofa.report.engine.cell.visible.form;

import com.yss.sofa.report.engine.Const;
import com.yss.sofa.report.engine.cell.ReportCell;

public class UrlTreeSelectFormCell extends FormCell{
	private static final long serialVersionUID = -6831244968567117115L;
	private String url;
	private String sofaUrl;
	private boolean multi;
	private boolean leaf;
	private String displayField;
	//private String valueField;
	private String mode;
	private int search;
	private String query;
	
	private int limitCount;
	private String igronSelectField;
	private int delay;
	private String blankText;
	private boolean expandAll;
	private boolean canInput;
	private String placeholder;
	private String splitQuery;
	private String validator;
	
	protected void init() {

		super.init();
		multi = false;
		leaf = false;
		displayField = "name";
		// valueField="id";
		mode = "remote";
		search = 4;
		query = Const.NONE;
		inputType = Const.FORM_INPUT_TYPE_URL_TREE_SELECT;
		
		limitCount = 999999;
		igronSelectField = "";
		delay = 500;
		blankText = "";
		expandAll = true;
		canInput = false;
		placeholder = "";
		splitQuery = "";
		validator= "";
	}
	
	public void assignTo(ReportCell cell){
		UrlTreeSelectFormCell _=(UrlTreeSelectFormCell)cell;
		super.assignTo(_);
		_.url=this.url;
		_.sofaUrl=this.sofaUrl;
		_.multi=this.multi;
		_.leaf=this.leaf;
		_.displayField=this.displayField;
	//	_.valueField=this.valueField;
		_.mode=this.mode;
		_.search=this.search;
		_.query=this.query;
		
		_.limitCount = this.limitCount;
		_.igronSelectField = this.igronSelectField;
		_.delay = this.delay;
		_.blankText = this.blankText;
		_.expandAll = this.expandAll;
		_.canInput = this.canInput;
		_.placeholder = this.placeholder;
		_.splitQuery = this.splitQuery;
		_.validator = this.validator;
	}
	
	public UrlTreeSelectFormCell create(){
		UrlTreeSelectFormCell _=new UrlTreeSelectFormCell();
		this.assignTo(_);
		return _;
	}
	public String getRenderSource() {
		return "url-tree-select-field";
	}
	public String getUrl() {
	
		return url;
	}
	public void setUrl(String url) {
	
		this.url = url;
	}
	public boolean isMulti() {
	
		return multi;
	}
	public void setMulti(boolean multi) {
	
		this.multi = multi;
	}
	public boolean isLeaf() {
	
		return leaf;
	}
	public void setLeaf(boolean leaf) {
	
		this.leaf = leaf;
	}
	
	/**
	 * @return the displayField
	 */
	public String getDisplayField() {
	
		return displayField;
	}
	
	/**
	 * @param displayField the displayField to set
	 */
	public void setDisplayField(String displayField) {
	
		this.displayField = displayField;
	}
	
//	/**
//	 * @return the valueField
//	 */
//	public String getValueField() {
//	
//		return valueField;
//	}
//	
//	/**
//	 * @param valueField the valueField to set
//	 */
//	public void setValueField(String valueField) {
//	
//		this.valueField = valueField;
//	}
	@Override
	public boolean isCustom() {
		return false;
	}
	public String getMode() {
		return mode;
	}
	public void setMode(String mode) {
		this.mode = mode;
	}
	public int getSearch() {
		return search;
	}
	public void setSearch(int search) {
		this.search = search;
	}
	public String getQuery() {
		return query;
	}
	public void setQuery(String query) {
		this.query = query;
	}
	
	/**
	 * @return the igronSelectField
	 */
	public String getIgronSelectField() {
	
		return igronSelectField;
	}
	
	/**
	 * @param igronSelectField the igronSelectField to set
	 */
	public void setIgronSelectField(String igronSelectField) {
	
		this.igronSelectField = igronSelectField;
	}
	
	/**
	 * @return the delay
	 */
	public int getDelay() {
	
		return delay;
	}
	
	/**
	 * @param delay the delay to set
	 */
	public void setDelay(int delay) {
	
		this.delay = delay;
	}
	
	/**
	 * @return the blankText
	 */
	public String getBlankText() {
	
		return blankText;
	}
	
	/**
	 * @param blankText the blankText to set
	 */
	public void setBlankText(String blankText) {
	
		this.blankText = blankText;
	}
		
	
	/**
	 * @return the expandAll
	 */
	public boolean isExpandAll() {
	
		return expandAll;
	}
	
	/**
	 * @param expandAll the expandAll to set
	 */
	public void setExpandAll(boolean expandAll) {
	
		this.expandAll = expandAll;
	}
	/**
	 * @return the limitCount
	 */
	public int getLimitCount() {
	
		return limitCount;
	}
	
	/**
	 * @param limitCount the limitCount to set
	 */
	public void setLimitCount(int limitCount) {
	
		this.limitCount = limitCount;
	}

	
	/**
	 * @return the canInput
	 */
	public boolean isCanInput() {
	
		return canInput;
	}

	
	/**
	 * @param canInput the canInput to set
	 */
	public void setCanInput(boolean canInput) {
	
		this.canInput = canInput;
	}

	
	/**
	 * @return the placeholder
	 */
	public String getPlaceholder() {
	
		return placeholder;
	}

	
	/**
	 * @param placeholder the placeholder to set
	 */
	public void setPlaceholder(String placeholder) {
	
		this.placeholder = placeholder;
	}

	
	/**
	 * @return the splitQuery
	 */
	public String getSplitQuery() {
	
		return splitQuery;
	}

	
	/**
	 * @param splitQuery the splitQuery to set
	 */
	public void setSplitQuery(String splitQuery) {
	
		this.splitQuery = splitQuery;
	}

	
	/**
	 * @return the validator
	 */
	public String getValidator() {
	
		return validator;
	}

	
	/**
	 * @param validator the validator to set
	 */
	public void setValidator(String validator) {
	
		this.validator = validator;
	}

	
	/**
	 * @return the sofaUrl
	 */
	public String getSofaUrl() {
	
		return sofaUrl;
	}

	
	/**
	 * @param sofaUrl the sofaUrl to set
	 */
	public void setSofaUrl(String sofaUrl) {
	
		this.sofaUrl = sofaUrl;
	}
}
